package com.study.lxy.mutithread;

import java.util.Date;
import java.util.concurrent.*;

public class ScheduledThreadPoolExecuterApp {
    /*
    public static void main(String[] args) throws Exception{
        ScheduledExecutorService se = Executors.newScheduledThreadPool(10);
        se.scheduleWithFixedDelay(() ->{
            System.out.println("current time is : " + new Date());
        },3000,2000, TimeUnit.MILLISECONDS);

        ScheduledFuture<Date> execute_the_task = se.schedule(() -> {
            System.out.println("execute the task");
            return new Date();
        }, 3000, TimeUnit.MILLISECONDS);

        Date date = execute_the_task.get();
        System.out.println("result is : " + date);

    }
    */
}
